﻿using System;
using RootMotion.FinalIK;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020000A7 RID: 167
	public class InteractionC2CDemo : MonoBehaviour
	{
		// Token: 0x0600057B RID: 1403 RVA: 0x000057E3 File Offset: 0x000039E3
		public void OnGUI()
		{
			if (GUILayout.Button("Shake Hands", new GUILayoutOption[0]))
			{
				this.character1.StartInteraction(FullBodyBipedEffector.RightHand, this.handShake, true);
				this.character2.StartInteraction(FullBodyBipedEffector.RightHand, this.handShake, true);
			}
		}

		// Token: 0x0600057C RID: 1404 RVA: 0x00035830 File Offset: 0x00033A30
		public void LateUpdate()
		{
			Vector3 position = Vector3.Lerp(this.character1.ik.solver.rightHandEffector.bone.position, this.character2.ik.solver.rightHandEffector.bone.position, 0.5f);
			this.handShake.transform.position = position;
		}

		// Token: 0x0400046C RID: 1132
		public InteractionSystem character1;

		// Token: 0x0400046D RID: 1133
		public InteractionSystem character2;

		// Token: 0x0400046E RID: 1134
		public InteractionObject handShake;
	}
}
